{include file="public/header" /}
<form method="post" class="form-x">
    <div class="panel admin-panel">
        <div class="panel-head"><strong>{:lang('currency')['edit']}</strong></div>
        <br/>
        <script>
            //city canshu
            var pid='{:input("get.pid")}';
            var cid='{:input("get.cid")}';
            var aid='{:input("get.aid")}';
            var selectc=true;
            var selecta=true;
            function select_a() {
                location.href = '?pid='+pid+'&cid='+cid+'&aid='+aid;
            }
        </script>
        <div class="form-group">
            <div class="label">
                <label>{:lang('currency')['city']}</label>
            </div>
            <div class="field">
                {include file="public/city" /}
            </div>
        </div>
        {if input('get.aid')}
        <form method="post" class="form-x">
            <div class="form-group">
                <div class="label">
                    <label>起送范围</label>
                </div>
                <div class="field">
                    <input type="number" class="input input-auto" id="scope" name="scope" value="{$data.scope}" style="width: 100px" placeholder="{:lang('currency')['required']}" data-validate="required:{:lang('currency')['required']}" /> km
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>基础配送费</label>
                </div>
                <div class="field">
                    <input type="number" class="input input-auto" id="charge" name="charge" value="{if !$data.charge}3.00{else}{$data.charge}{/if}" style="width: 100px" placeholder="{:lang('currency')['required']}" data-validate="required:{:lang('currency')['required']}" /> 元
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>超出后每公里加收配送费</label>
                </div>
                <div class="field">
                    <input type="number" class="input input-auto" id="add_charge" name="add_charge" value="{$data.add_charge}" style="width: 100px" placeholder="{:lang('currency')['required']}" data-validate="required:{:lang('currency')['required']}" /> 元
                </div>
            </div>
            <div class="form-button">
                <button class="button bg-main" type="submit">提交</button>
            </div>
            <br/>
        </form>
        {else}
        <div class="form-group" style="margin-bottom: 10px">
            <div class="label">
                <label></label>
            </div>
            <div class="field">
                请选择城市后设置
            </div>
        </div>
        {/if}
    </div>
</form>
{include file="public/footer" /}